package com.yfqy.app.domain.mapper;

import com.yfqy.app.modules.product.vo.CategoryVO;
import com.yfqy.app.domain.entity.Category;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CategoryMapper {

    int insertSelective(Category record);

    Category selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Category record);

    List<CategoryVO> selectAllRoot();

    Category selectOneByName(@Param("name") String name);

    List<CategoryVO> selectByParentIds(@Param("ids") List<Long> ids);

    int deleteCategoryById(@Param("id") Long id, @Param("modifiedBy") Long modifiedBy);

    int selectCountById(@Param("id") Long id);

    String getCategoryNameById(@Param("id") Long id);
}